<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    div {
        width: fit-content;
        margin: 25px;
        padding: 10px 15px;
        border: 2px solid rgb(30, 0, 255);
        border-radius: 50px;
        background-color: rgba(0, 123, 255, 0.29);
        }
        img {
        border-radius: 50px;
        border: 2px solid rgb(30, 0, 255);
        }
    </style>
</head>
<body>
    <script>
        let num = 0
        while (true) {
        num = +prompt('请输入要渲染图片的个数：')
        if (num >= 1 && num <= 5) {
        break
        }else {
        alert('无效的输入，请重试')}
        }
        document.write(`<div>`)
        for(let i = 1; i <= num; i++) {
        document.write(`<img src="./j${i}.jpg>`)}
        document.write(`</div>`)
    </script>
</body>
</html>